package com.example.demo.pojos;

import javax.persistence.*;
import java.util.List;
import java.util.Objects;

@Entity
public class Fixdepartment {
    private int fdId;
    private String fdFixDepartment;
    private List<Fixreceive> wxjj;


    @Id
    @Column(name = "fd_ID", nullable = false)
    public int getFdId() {
        return fdId;
    }

    public void setFdId(int fdId) {
        this.fdId = fdId;
    }

    @Basic
    @Column(name = "fd_fixDepartment", nullable = false, length = 10)
    public String getFdFixDepartment() {
        return fdFixDepartment;
    }

    public void setFdFixDepartment(String fdFixDepartment) {
        this.fdFixDepartment = fdFixDepartment;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Fixdepartment that = (Fixdepartment) o;
        return fdId == that.fdId &&
                Objects.equals(fdFixDepartment, that.fdFixDepartment);
    }

    @Override
    public int hashCode() {
        return Objects.hash(fdId, fdFixDepartment);
    }

    @OneToMany(mappedBy = "wxbm")
    public List<Fixreceive> getWxjj() {
        return wxjj;
    }

    public void setWxjj(List<Fixreceive> wxjj) {
        this.wxjj = wxjj;
    }
}
